home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / masdir54.zip / DEMOSDL.BAT < prev    next >
DOS Batch File  |  1990-10-21  |  14KB  |  313 lines

  1. ECHO OFF
  2. IF (%SDL%) == () SET SDL=S
  3. IF (%SDL%) == () GOTO ENVIRON
  4. :FIRST
  5. sdl_get BE %A%
  6. ECHO * * *
  7. ECHO The first thing we will do is simply enter SDL all by itself.
  8. ECHO All you have to do is to find the key marked Esc and press
  9. ECHO it when the display pauses and waits for your input.
  10. ECHO * * *
  11. ECHO The default sort order (by Name) will be shown if SDL is in its
  12. ECHO original default configuration. Just observe the general format
  13. ECHO of the output and press Esc when you are ready to continue. Do
  14. ECHO not experiment with any other keys just yet.
  15. ECHO * * *
  16. pause
  17. sdl
  18. ECHO * * *
  19. if errorlevel 73 goto IS6
  20. if errorlevel 37 goto IS4
  21. ECHO In this case all of the file names fit on one screen in two columns.
  22. GOTO MORE
  23. :IS6
  24. ECHO Notice that the file names were displayed in six columns.
  25. GOTO MORE
  26. :IS4
  27. ECHO Notice that the file names were displayed in four columns.
  28. :MORE
  29. ECHO * * *
  30. ECHO If there are more file names than will fit in two columns, SDL will
  31. ECHO adjust the number of columns to try to fit them all on one screen.
  32. ECHO You can override this automatic adjustment by using a number option
  33. ECHO such as /2 or /4.
  34. ECHO Whenever the disk contains more files than can be fit on one screen,
  35. ECHO you will notice a pause when the screen is full before the directory
  36. ECHO is fully displayed.  There are optional keys (N,X,S,D,O,2,4,6,Esc,etc.)
  37. ECHO listed on the bottom line.  Any other key (such as Enter or space)
  38. ECHO will continue with the display. C or PgDn will clear the screen
  39. ECHO before displaying the next page.
  40. ECHO * * *
  41. ECHO By the way, SDL sets the ERRORLEVEL to the number of files so in a batch
  42. ECHO program such as this you can check (as we did above) for this information.
  43. ECHO * * *
  44. ECHO Press Y to continue when ready, N to repeat the previous demo...
  45. sdl_get N "Continue? "
  46. if errorlevel 126 goto end
  47. if not errorlevel 89 goto FIRST
  48. :SECOND
  49. sdl_get B
  50. ECHO * * *
  51. ECHO The next demo is simply to enter SDL for the current directory
  52. ECHO and specify a 2 column display.  Notice the 2 columns of file
  53. ECHO names, and the option menu at the bottom of the display.  You
  54. ECHO may experiment by pressing any of the keys shown in CAPS or
  55. ECHO numbers to change the display.  If you press P or L
  56. ECHO you will see the print menu.  Be sure your printer is on line if
  57. ECHO you decide to try printing.   (Otherwise your system may hang.)
  58. ECHO If you press E you will be asked to enter new titles.  That's OK.
  59. ECHO If you are adventurous just follow the prompts.
  60. ECHO * * *
  61. ECHO To exit and return to this DEMO press Esc to leave the directory on
  62. ECHO the screen, or either the space bar or Enter key to clear the screen.
  63. ECHO This may look like the previous demo depending on the number of files.
  64. ECHO (In the evaluation version the moving registration message may cover
  65. ECHO up the bottom row of the display if it extends down that far.)
  66. ECHO * * *
  67. ECHO SDL /2
  68. ECHO * * *
  69. ECHO Press Y to continue when ready, N to repeat the previous demo...
  70. sdl_get N "Continue? "
  71. if errorlevel 126 goto end
  72. if not errorlevel 89 goto FIRST
  73. SDL /2
  74. sdl_get B
  75. :THIRD
  76. ECHO * * *
  77. ECHO As you can see, SDL works very much like DIR, only it is much
  78. ECHO more powerful and versatile.  You will probably never want to
  79. ECHO use DIR again.  Did you notice how the files were sorted?  Not
  80. ECHO helter skelter like DIR, but in alphabetical order.  If you use
  81. ECHO different extensions on your files to denote different uses for
  82. ECHO the files, you might like to see the files sorted by extension.
  83. ECHO To do this it is not necessary to exit to DOS and run SDL all over
  84. ECHO again.  You can easily change the sort order by pressing one of
  85. ECHO the keys: X for eXtension, S for Size, D for Date and time, N
  86. ECHO for Name, or O to not sort at all and show the files in the
  87. ECHO same order as DIR would.  Try it.  The files will be sorted by
  88. ECHO eXtension.  Try the other keys and observe the differences.
  89. ECHO * * *
  90. ECHO The "command line" is the line on which you enter your commands at the
  91. ECHO DOS prompt. When we show the options as / something, we mean that they
  92. ECHO are entered on the command line from the DOS prompt after SDL,
  93. ECHO not at the end of the display.  To make a menu selection at the
  94. ECHO end of the display simply press the key without the / and without
  95. ECHO Enter. Now we are ready to enter the command to sort by eXtension
  96. ECHO and we will also specify a 4 column display.
  97. ECHO * * *
  98. ECHO SDL /x /4
  99. ECHO * * *
  100. ECHO Press Y to continue when ready, N to repeat the previous demo...
  101. sdl_get N "Continue? "
  102. if errorlevel 126 goto end
  103. if not errorlevel 89 goto SECOND
  104. sdl_get B
  105. ECHO The last one went by pretty fast, so this time we'll include
  106. ECHO /c to turn the screen clearing OFF and let you see what is happening.
  107. echo Note the file order, and press a sort key:  n x s d o
  108. sdl  /x/c/4
  109. ECHO off
  110. :FOURTH
  111. sdl_get B
  112. ECHO * * *
  113. ECHO There are two options that control aspects of the screen display.
  114. ECHO the /C option toggles the clearing of the screen both before and
  115. ECHO after the directory listing is displayed.  If the screen has been
  116. ECHO clearing before showing the directory (the original default), then
  117. ECHO /C will cause it not to clear, but to scroll.  This may slow down
  118. ECHO the display slightly.  Press C at the end to clear the screen.
  119. ECHO * * *
  120. ECHO The /H option will turn off the first two lines of the header (Hdr)
  121. ECHO This makes room for two more rows of file names.  The first Hdr row
  122. ECHO is more useful for floppies because it shows the volume label, but
  123. ECHO if you are listing files on a hard disk, the first two rows don't
  124. ECHO give you any new information, and can easily be dispensed with unless
  125. ECHO you need the reminder line.  /H is also a toggle, so if the first 2
  126. ECHO lines have been turned off, /H will turn them back on.
  127. ECHO * * *
  128. ECHO Let's display all files ending in .DOC.  The command is
  129. ECHO * * *
  130. ECHO sdl *.doc /c/h
  131. ECHO * * *
  132. ECHO Press Y to continue when ready, N to repeat the previous demo...
  133. sdl_get N "Continue? "
  134. if errorlevel 126 goto end
  135. if not errorlevel 89 goto THIRD
  136. ECHO We are turning "echo" ON so you can see the command.
  137. ECHO Now try pressing H and C to see the effects.  Look for a "hidden" file.
  138. echo on
  139. sdl *.doc /c/h
  140. ECHO off
  141. :FIFTH
  142. ECHO * * *
  143. ECHO In the previous 2 column display you may have noticed a column
  144. ECHO labelled Atr.  This column shows the file attributes as H for hidden,
  145. ECHO R for read only, S for system, and A if the archive bit is set.
  146. ECHO * * *
  147. ECHO Two options control the types of files that will be displayed. The /A
  148. ECHO option stands for All and controls the display of sub-directories and
  149. ECHO hidden files. It is another toggle, so using /A will change it from the
  150. ECHO default which originally is ON  (DIRs and hidden are shown).
  151. ECHO Hidden files can't hide from SDL unless you want them to.
  152. ECHO * * *
  153. ECHO Press Y to continue when ready, N to repeat the previous demo...
  154. sdl_get N "Continue? "
  155. if errorlevel 126 goto end
  156. if not errorlevel 89 goto FOURTH
  157. ECHO * * *
  158. ECHO The /k option shows only files that have their archive bit set.
  159. ECHO This will be of interest to you if you use a bacKup program that
  160. ECHO uses the archive bit to determine which files need backing up.
  161. ECHO (The DOS BACKUP command is one.)  Don't use /A and /K at the
  162. ECHO same time.  /K takes precedence and cancels /A.  You can also press
  163. ECHO the A or K keys when shown on the menu to change the display without
  164. ECHO exiting back to the DOS prompt.
  165. ECHO * * *
  166. ECHO This time we will specify a 2 column display and use the /K option
  167. ECHO so you can see the A's in the Atr column.  We will also use /M (for More)
  168. ECHO to turn off the pause at the end of the display (but to give you
  169. ECHO time to read, we will have DOS pause for you.  This time any
  170. ECHO key at all will continue, so don't press one until ready.)
  171. ECHO The command is
  172. ECHO * * *
  173. ECHO SDL /k/m/2
  174. ECHO * * *
  175. ECHO Press Y to continue when ready, N to repeat the previous demo...
  176. sdl_get N "Continue? "
  177. if errorlevel 126 goto end
  178. if not errorlevel 89 goto FOURTH
  179. sdl /k/m/2
  180. pause
  181. :SIXTH
  182. ECHO * * *
  183. ECHO Notice that by not pausing, the menu at the end of the directory is
  184. ECHO not available.  There are times when this might be useful.  Not
  185. ECHO pausing also suppresses the intermediate pause if the screen fills.
  186. ECHO If you have been using fewer files than will fill a screen, you
  187. ECHO have not seen the pause at the end of the intermediate screens,
  188. ECHO only the final screen.  You can demonstrate this for yourself by
  189. ECHO running SDL on a directory or disk with more files.  When you do
  190. ECHO that you will see the pause prompt starting with --More-- indicating
  191. ECHO that the keys shown will do something other than just continue with
  192. ECHO the next screen.  If you press one of them, SDL will immediately
  193. ECHO start the display over again using the number of columns you specify.
  194. ECHO Any other key will continue.  Try it later on a larger directory.  
  195. ECHO * * *
  196. ECHO Press Y to continue when ready, N to repeat the previous demo...
  197. sdl_get N "Continue? "
  198. if errorlevel 126 goto end
  199. if not errorlevel 89 goto FIFTH
  200. sdl_get B
  201. ECHO * * *
  202. ECHO Another key that is available at either an intermediate or final pause
  203. ECHO is the Esc (for Escape) key.  This will exit immediately without
  204. ECHO clearing the screen.  Try it on this next display which will also
  205. ECHO use the /A option.  If this is a subdirectory, or has any hidden
  206. ECHO files, you would have seen them with the default configuration.  If
  207. ECHO so, the /A will now turn them off (it is one of the toggles).  We have
  208. ECHO included a hidden file for the demo. If you saw it before you won't
  209. ECHO now.  The command is
  210. ECHO * * *
  211. ECHO SDL /A/C
  212. ECHO * * *
  213. ECHO Press Y to continue when ready, N to repeat the previous demo...
  214. sdl_get N "Continue? "
  215. if errorlevel 126 goto end
  216. if not errorlevel 89 goto FIFTH
  217. sdl_get B
  218. ECHO Press the Esc key when you want to exit.... . . .   .   .   .   .
  219. sdl /a/c
  220. :SEVENTH
  221. ECHO * * *
  222. ECHO That time we did not use the DOS Cls command, so the screen did not
  223. ECHO clear, but is now scrolling.  Exiting with Esc is the way to keep
  224. ECHO the directory on the screen if you want to.
  225. ECHO * * *
  226. ECHO To summarize all the available commands there is a /? option which will
  227. ECHO display a screen of HELP information.  It is a brief summary of everything
  228. ECHO available in SDL.  Because SDL is so powerful, it may be a little
  229. ECHO overwhelming at first, but it is nice to know that /? is available
  230. ECHO in case you ever need a reminder of some little used, but available,
  231. ECHO option.
  232. ECHO Because of the many new features in SDL, there are now two help
  233. ECHO screens.  The second one explains the print options and can be seen
  234. ECHO by pressing P at the end of the first screen as shown on the menu.
  235. ECHO When you exit, /? does not pause at the end of the display so we will
  236. ECHO again use the DOS PAUSE command to give you time to read the screen.
  237. ECHO This time the commmand is simply
  238. ECHO * * *
  239. ECHO SDL /?
  240. ECHO * * *
  241. ECHO Press Y to continue when ready, N to repeat the previous demo...
  242. sdl_get N "Continue? "
  243. if errorlevel 126 goto end
  244. if not errorlevel 89 goto SIXTH
  245. sdl /?
  246. pause
  247. :EIGHTH
  248. sdl_get B
  249. ECHO * * *
  250. ECHO A useful feature of SDL is that it allows you to specify replace-
  251. ECHO ment text for three title lines with the /E option.  This lets
  252. ECHO you print labels and sleeve inserts with descriptions,
  253. ECHO identification, instructions, etc.
  254. ECHO * * *
  255. ECHO The first two lines can also be customized to your liking by using
  256. ECHO the setup program SDLSETUP.  For example you can change them to show
  257. ECHO your company name, address and telephone number to positively
  258. ECHO identify the source of the disk.  You can still use /E to make
  259. ECHO temporary changes whenever you want to, and if you forget the /E
  260. ECHO you can enter E as an option at the end menu.
  261. ECHO * * *
  262. ECHO Press Y to continue when ready, N to repeat the previous demo...
  263. sdl_get N "Continue? "
  264. if errorlevel 126 goto end
  265. if not errorlevel 89 goto SEVENTH
  266. sdl_get B
  267. ECHO * * *
  268. ECHO As the last non-printing demo, we will invoke the /E option and
  269. ECHO let you enter any 1, 2, or 3 lines you want to.  Notice how they show
  270. ECHO up at the top of the display.  The H option still gives control
  271. ECHO over the display of the first two title lines.  Try pressing the H
  272. ECHO key at the end of the display and watch the first two lines flip
  273. ECHO from on to off or off to on.
  274. ECHO * * *
  275. ECHO This time we'll show 6 COLS and look only at the COM files.
  276. ECHO The command is
  277. ECHO * * *
  278. ECHO SDL *.com /E/6/c
  279. ECHO * * *
  280. ECHO To leave a line unchanged just press Enter.  To blank out an entire
  281. ECHO line, just enter one or more spaces.
  282. ECHO ON
  283. sdl *.com /e/6/c
  284. ECHO Off
  285. IF NOT .%1==.YES GOTO NOPRINT
  286. ECHO Now we are ready to begin the printing demos.
  287. ECHO Press Y to continue when ready, N to repeat the previous demo...
  288. sdl_get N "Continue? "
  289. if errorlevel 126 goto NOPRINT
  290. if not errorlevel 89 goto EIGHTH
  291. sdl_get B
  292. demoprn
  293. :NOPRINT
  294. ECHO * * *
  295. ECHO You have requested to not include the printing demos at this time.
  296. ECHO Printing of labels and sleeve inserts is a valuable feature of SDL.
  297. ECHO SDL has some automatic printing features that greatly
  298. ECHO simplify the printing of labels.  The /L (for Label) option does
  299. ECHO all of the calculation necessary to fit the file names onto the
  300. ECHO label. The /I (for Insert) option will print a sleeve insert.
  301. REM The /I and /L options will automatically calculate the number of
  302. REM columns needed for the number of file names to be printed.
  303. ECHO * * *
  304. ECHO Please be sure to run the DEMO with printing, and/or read
  305. ECHO the documentation to learn more about it.
  306. ECHO Press Y to continue when ready, N to repeat the previous demo...
  307. sdl_get N "Continue? "
  308. if not errorlevel 89 goto EIGHTH
  309. :end
  310. MENU
  311. :ENVIRON
  312. MENU ENVIRON
  313.